package com.zl.learning.guice;

import com.google.gson.Gson;
import com.google.inject.Inject;
import com.google.inject.Singleton;

@Singleton
public class MyApp {
    @Inject
    private IUserService userService;
    @Inject
    private ILogService logService;
    @Inject
    private Gson gson;

    public void work() {
        userService.process();
        logService.log("程序正常运行");
        System.out.println(gson.toJson("HelloWorld"));
    }
}
